Automatic scaling for legibility

ABSTRACT

A method, computer program product and computer system to improve print legibility is provided. A processor receives a file to print. A processor generates a print preview of the file, wherein the print preview is generated at an initial scale. A processor generates a preview text for the print preview. A processor determines a legibility metric based for the print preview on a comparison between the preview text for the print preview and text of the file to print. A processor prints the file at a second scale in response to the legibility metric being below a predetermined value, wherein the second scale is larger than the initial scale.

BACKGROUND OF THE INVENTION

The present invention relates generally to the field of documentpresentation and digital printing, and more particularly to automaticscaling for legibility of a document.

Digital printing is the process of taking image or document data tocreate a copy. The copy can be a printed version of the image ordocument. The copy can be a digital file for document presentation, suchas a portable document format or PDF. In both cases, digital printingconverts images and other document data to a format that reproduces theimages and other document data to create the copy.

SUMMARY

Embodiments of the present invention provide a method, system, andprogram product to improve print legibility. A processor receives a fileto print. A processor generates a print preview of the file, wherein theprint preview is generated at an initial scale. A processor generates apreview text for the print preview. A processor determines a legibilitymetric based for the print preview on a comparison between the previewtext for the print preview and text of the file to print. A processorprints the file at a second scale in response to the legibility metricbeing below a predetermined value, wherein the second scale is largerthan the initial scale.

BRIEF DESCRIPTION OF THE SEVERAL VIEWS OF THE DRAWINGS

FIG. 1 is a functional block diagram illustrating a networkedenvironment, in accordance with an exemplary embodiment of the presentinvention.

FIG. 2 illustrates operational processes of a print legibility program,on a computing device within the environment of FIG. 1, in accordancewith an exemplary embodiment of the present invention.

FIG. 3 illustrates a flow diagram of a print legibility program, on acomputing device within the environment of FIG. 1, in accordance with anexemplary embodiment of the present invention.

FIG. 4 depicts a block diagram of components of the computing deviceexecuting a print legibility program, in accordance with an exemplaryembodiment of the present invention.

DETAILED DESCRIPTION

When printing to a target device or format, many factors influence theresulting output's quality, such as print area or display size of thetarget output form. In printer devices, as well as digital documentcontainers, a resolution or dots per inch (DPI) setting also impacts theoutput's quality or legibility of the text. Many prior solutions defaultthe resolution or DPI setting to the lowest value to save on ink orminimize file size. Many users do not recognize the lower quality untilafter the process of digital printing has finished, forcing the user tomanually update the resolution or DPI and repeat the process again.

Embodiments to the present invention provide an automatic process fordetecting and altering the scaling of the printing output such that thetext output for the digital printing is readable or legible. In variousembodiments of the invention, a print preview is generated at a defaultscale. Based on various analysis of the print preview, embodiments ofthe present invention determine a legibility metric for the printingoutput. If the legibility metric is below a certain value, thenembodiments of the present invention increase the scaling of thedocument prior to the document being sent to the output device forprinting. Embodiments to the present invention provide improvements tothe legibility of printing output by automatically detecting thelegibility of the output prior to creation without the need for the userto reprint or repeat the process, ensuring legible output prior to beingsent for printing.

The present invention may be a system, a method, and/or a computerprogram product at any possible technical detail level of integration.The computer program product may include a computer readable storagemedium (or media) having computer readable program instructions thereonfor causing a processor to carry out aspects of the present invention.

The computer readable storage medium can be a tangible device that canretain and store instructions for use by an instruction executiondevice. The computer readable storage medium may be, for example, but isnot limited to, an electronic storage device, a magnetic storage device,an optical storage device, an electromagnetic storage device, asemiconductor storage device, or any suitable combination of theforegoing. A non-exhaustive list of more specific examples of thecomputer readable storage medium includes the following: a portablecomputer diskette, a hard disk, a random access memory (RAM), aread-only memory (ROM), an erasable programmable read-only memory (EPROMor Flash memory), a static random access memory (SRAM), a portablecompact disc read-only memory (CD-ROM), a digital versatile disk (DVD),a memory stick, a floppy disk, a mechanically encoded device such aspunch-cards or raised structures in a groove having instructionsrecorded thereon, and any suitable combination of the foregoing. Acomputer readable storage medium, as used herein, is not to be construedas being transitory signals per se, such as radio waves or other freelypropagating electromagnetic waves, electromagnetic waves propagatingthrough a waveguide or other transmission media (e.g., light pulsespassing through a fiber-optic cable), or electrical signals transmittedthrough a wire.

Computer readable program instructions described herein can bedownloaded to respective computing/processing devices from a computerreadable storage medium or to an external computer or external storagedevice via a network, for example, the Internet, a local area network, awide area network and/or a wireless network. The network may comprisecopper transmission cables, optical transmission fibers, wirelesstransmission, routers, firewalls, switches, gateway computers and/oredge servers. A network adapter card or network interface in eachcomputing/processing device receives computer readable programinstructions from the network and forwards the computer readable programinstructions for storage in a computer readable storage medium withinthe respective computing/processing device.

Computer readable program instructions for carrying out operations ofthe present invention may be assembler instructions,instruction-set-architecture (ISA) instructions, machine instructions,machine dependent instructions, microcode, firmware instructions,state-setting data, configuration data for integrated circuitry, oreither source code or object code written in any combination of one ormore programming languages, including an object oriented programminglanguage such as Smalltalk, C++, or the like, and procedural programminglanguages, such as the “C” programming language or similar programminglanguages. The computer readable program instructions may executeentirely on the user's computer, partly on the user's computer, as astand-alone software package, partly on the user's computer and partlyon a remote computer or entirely on the remote computer or server. Inthe latter scenario, the remote computer may be connected to the user'scomputer through any type of network, including a local area network(LAN) or a wide area network (WAN), or the connection may be made to anexternal computer (for example, through the Internet using an InternetService Provider). In some embodiments, electronic circuitry including,for example, programmable logic circuitry, field-programmable gatearrays (FPGA), or programmable logic arrays (PLA) may execute thecomputer readable program instructions by utilizing state information ofthe computer readable program instructions to personalize the electroniccircuitry, in order to perform aspects of the present invention.

Aspects of the present invention are described herein with reference toflowchart illustrations and/or block diagrams of methods, apparatus(systems), and computer program products according to embodiments of theinvention. It will be understood that each block of the flowchartillustrations and/or block diagrams, and combinations of blocks in theflowchart illustrations and/or block diagrams, can be implemented bycomputer readable program instructions.

These computer readable program instructions may be provided to aprocessor of a computer, or other programmable data processing apparatusto produce a machine, such that the instructions, which execute via theprocessor of the computer or other programmable data processingapparatus, create means for implementing the functions/acts specified inthe flowchart and/or block diagram block or blocks. These computerreadable program instructions may also be stored in a computer readablestorage medium that can direct a computer, a programmable dataprocessing apparatus, and/or other devices to function in a particularmanner, such that the computer readable storage medium havinginstructions stored therein comprises an article of manufactureincluding instructions which implement aspects of the function/actspecified in the flowchart and/or block diagram block or blocks.

The computer readable program instructions may also be loaded onto acomputer, other programmable data processing apparatus, or other deviceto cause a series of operational steps to be performed on the computer,other programmable apparatus or other device to produce a computerimplemented process, such that the instructions which execute on thecomputer, other programmable apparatus, or other device implement thefunctions/acts specified in the flowchart and/or block diagram block orblocks.

The flowchart and block diagrams in the Figures illustrate thearchitecture, functionality, and operation of possible implementationsof systems, methods, and computer program products according to variousembodiments of the present invention. In this regard, each block in theflowchart or block diagrams may represent a module, segment, or portionof instructions, which comprises one or more executable instructions forimplementing the specified logical function(s). In some alternativeimplementations, the functions noted in the blocks may occur out of theorder noted in the Figures. For example, two blocks shown in successionmay, in fact, be accomplished as one step, executed concurrently,substantially concurrently, in a partially or wholly temporallyoverlapping manner, or the blocks may sometimes be executed in thereverse order, depending upon the functionality involved. It will alsobe noted that each block of the block diagrams and/or flowchartillustration, and combinations of blocks in the block diagrams and/orflowchart illustration, can be implemented by special purposehardware-based systems that perform the specified functions or acts orcarry out combinations of special purpose hardware and computerinstructions.

The present invention will now be described in detail with reference tothe Figures. FIG. 1 is a functional block diagram illustrating networkedenvironment, generally designated 100, in accordance with one embodimentof the present invention. Networked environment 100 includes computingdevice 110 connected over network 150. Computing device 110 includesprint legibility program 120, file data 130 and target data 140. Printlegibility program 120 includes print-preview module 122, opticalcharacter recognition (OCR) module 124, edit-distance module 125, n-grammodule 126 and adjustment module 128.

In various embodiments of the present invention, computing device 110 isa computing device that can be a standalone device, a server, a laptopcomputer, a tablet computer, a netbook computer, a personal computer(PC), or a desktop computer. In another embodiment, computing device 110represents a computing system utilizing clustered computers andcomponents to act as a single pool of seamless resources. In general,computing device 110 can be any computing device or a combination ofdevices with access to file data 130 and target data 140 and is capableof executing print legibility program 120. Computing device 110 mayinclude internal and external hardware components, as depicted anddescribed in further detail with respect to FIG. 4.

In this exemplary embodiment, print legibility program 120, file data130 and target data 140 are stored on computing device 110. However, inother embodiments, print legibility program 120, file data 130 andtarget data 140 may be stored externally and accessed through acommunication network, such as network 150. Network 150 can be, forexample, a local area network (LAN), a wide area network (WAN) such asthe Internet, or a combination of the two, and may include wired,wireless, fiber optic or any other connection known in the art. Ingeneral, network 150 can be any combination of connections and protocolsthat will support communications between computing device 110 and otherdevices (not shown) connected to network 150, in accordance with adesired embodiment of the present invention.

In various embodiments, print legibility program 120 determines alegibility metric for a document or file to be printed to a targetdevice. Based on the legibility metric being below a threshold value,print legibility program 120 increases the scaling for the documentprior to be printed to the target device. In some embodiments, printlegibility program 120 is a stand-alone application that a user providesan indication of a file from file data 130 to be printed. In otherembodiments, print legibility program 120 is an add-on, extension,plug-in, application programming interface (API) or the like that isintegrated into or included alongside another application, such as aword processor or photo editor, which provides the file to be printed toprint legibility program 120.

In various embodiments, print legibility program 120 has access to filedata 130. File data 130 includes a variety of file types such as, butnot limited to, text documents, images, word processing documents, orany file that can be printed. Print legibility program 120 has access totarget data 140. Target data 140 includes information indicating therequirements, restrictions, limits of any output devices that can beselected to produce a printed copy of file data 130. For example, targetdata 140 includes a print area (e.g., target margins), print size (e.g.,target document's dimensions), print resolution (e.g., dots per inch(DPI)), and other indicative information regarding the capabilities orlimitations of an output device when printing a file. In someembodiments, target data 140 includes information regarding thecapabilities or limitations of a virtual printer software application,such as a portable document format (PDF) file, such as supported DPI orprint area sizes.

In various embodiments, print legibility program 120 includesprint-preview module 122. Print-preview module 122 generates a previewof the document or file to be printed based on the target data 140 of atarget device. For example, print-preview module 122 generates a printpreview based on a target device's selected print area, size, ordimensions of the printed output. In some scenarios, target data 140includes default or preferred values of the target device (e.g., 8″×11″or A4 print size) that print-preview module 122 utilizes when generatinga print preview. In other scenarios, print-preview module 122 isprovided preferred values of the target device by a user or by anotherapplication (e.g., a word processor).

Based on the target data 140 for a selected device to print file data130, print-preview module 122 generates a preview of the file to beprinted. Based on the target data 140 for the device, print legibilityprogram 120 selects a default scale for the print preview. For example,print legibility program 120 selects a default scale of 100% or 1:1.Print legibility program 120 generates a print preview that is an imageor render of the file that has the display area and resolution of thetarget data 140 that would typically be sent to the target device forprinting. However, embodiments of the invention provide additionalfunctionality to check if the print preview is legible given the currentselection of target data 140.

In various embodiments, print legibility program 120 includes opticalcharacter recognition (OCR) module 124. OCR module 124 converts theimage produced by print-preview module to text. OCR is a machine visionprocess that converts images with text to a computer readable format ofthe optically recognized text. Once the text is converted by OCR module124, print legibility program 120 determines a legibility metric for thecurrent print preview by comparing the original's file text to theconverted text generated by OCR module 124.

In various embodiments, print legibility program 120 includesedit-distance module 125. In various embodiments, edit-distance module125 determines an edit-distance between the file's text and the OCR textfor the print preview, or preview text. Edit-distance is metric thatquantifies the number of changes or edits need to be made for one stringof text to match another. Specifically, edit-distance is a count of thenumber of changes that need to be made to the preview text to match thefile's original text. For example, the original file has a singlesentence of “The quick brown fox jumps over the lazy dog” and OCR module124 produces an output of “The puick drown fox jump over the lazy dog”.In this example, the “q” from quick is recognized as the letter “p”, “b”from brown is recognized as a “d”, and the letter “s” from “jumps” wasnot recognized or provided in the preview text. As a result, in thisexample edit-distance module 125 determines the edit distance would bethree (3) between the file's text and the preview text. For an OCR of aprint preview that has a large edit-distance from the original text,print legibility program 120 determines that the print preview, andsubsequent printing, would be illegible or hard for a user to read onceprinted. As will be discussed herein, print legibility program 120alters scaling of the file to be printed in response to edit distancebeing above a threshold value.

In various embodiments, print legibility program 120 includes N-grammodule 126. N-grams are sub-sequences of items of a certain length. Forexample, a six (6) sequence n-gram (i.e., a “6-gram”) would be eachfive-word sequence found in a document. In this example, if a file has asingle sentence “The quick brown fox jumps over the lazy dog”, then four6-grams would be extracted (i.e., “The quick brown fox jumps over”,“quick brown fox jumps over the”, “brown fox jumps over the lazy”, and“fox jumps over the lazy dog”), where each six word long sub-sequence isextracted from the file.

In various embodiments, generates various n-grams of varying lengths(e.g., 2-grams, 3-grams, 4-grams, etc.) for both the original file'stext and the preview text of the print preview at the current scale.N-gram module 126 determines the number of matching n-grams between boththe original file's text and the preview text, where matching n-gramsequences in the OCR are “recalled” from the original text. For example,two 3-grams have been extracted from the original file text and thepreview text of the print preview. For the original file's text, the two3-grams are “The quick brown” and “brown fox jumps”. For the previewtext, the two 3-grams are “The quick brown” and “brown fox jumbs”. Inthis example, the “The quick brown” is correctly recalled, or matchesthe n-gram of the original file. However, the second 3-gram “brown foxjumbs”, is not and therefore does not match, or is recalled in thepreview text. As such for this example, one (1) matching, or recalled,n-gram is determined.

In various embodiments, for comparisons the have an amount of matchingor recalled n-grams being below a certain threshold, print legibilityprogram 120 determines that the print preview, and subsequent printing,would be illegible or hard for a user to read once printed. As will bediscussed herein, print legibility program 120 alters scaling of thefile to be printed in response to the amount of recalled n-grams beingbelow a threshold value. One of ordinary skill in the art willappreciate that any variety of n-gram length (i.e., n=1, 2, . . . etc.)or selection thereof may be used without deviating from the invention.

In some embodiments, print legibility program 120 determines alegibility metric based on the edit distance between the file's text andthe preview text. As the edit distance increases (indicating moredifferences between the two texts), print legibility program 120decreases the legibility metric for the print preview at the currentscale. In some embodiments, print legibility program 120 determines alegibility metric based on the number of recalled n-grams between thefile's text and the preview text. As the recalled n-grams increase(indicating fewer differences between the two texts), print legibilityprogram 120 increases the legibility metric for the print preview at thecurrent scale. In further embodiments, print legibility program 120includes both edit distance and recalled n-grams in the determination ofa legibility metric for the print preview at the current scale. Forexample, print legibility program 120 combines both edit distance andrecalled n-grams as a weighted average.

In various embodiments, print legibility program 120 includes adjustmentmodule 128. Adjustment module 128 of adjusts the scaling of thedocument, or elements of the documents, based on the determinedlegibility score. If the legibility score is above a threshold value,then adjustment module 128 sends the document to be printed to thetarget device at the current determined scale for legible printing. Ifthe legibility score is below a threshold value, then adjustment module128 increases the scaling for document and repeats the processesdiscussed herein, where the new increased scale is set as the currentscale for print legibility program 120.

In various embodiments, target data 140 includes a range of scale valuesfor the target device. When the eligibility score is below a thresholdvalue, print legibility program 120 increases the current scale based onthe range of scale values for the target device. If no increase in scalefactor is possible, then print legibility program 120 generates amessage informing the user printing the file that legibility issues mayexist when printing.

In some scenarios, portions of the file to be printed includevector-based font or vector drawings. In such scenarios, printlegibility program 120 re-renders the print image and the font ordrawings are redrawn at the higher scale factor. In other scenarios,portion of the file may include image files with text that was found tobe illegible by print legibility program 120. In such scenarios, printlegibility program 120 performs one or more scaling operations to theimage including, but not limited to, nearest-neighbor interpolation,bilinear interpolation, mipmaps, vectorization, or machine learning. Oneof ordinary skill in the art will appreciate that print legibilityprogram 120 may increase the current scale of a file to be printed basedon any known scaling techniques as discussed above or to be laterdiscovered, without deviating from the invention.

In various embodiments, print legibility program 120 repeats the processof generating a print-preview at a current scale, evaluating theprint-preview for legibility, and adjusting the current scale until thelegibility score is above a threshold value. In some embodiments, printlegibility program 120 determines legibility for one or more zones ofthe file. If a zone or section of the file to be printed has a lowerlegibility score than another zone, then print legibility program 120increases the scaling for that zone, while keeping the scaling for otherlegible portions at the previous value.

FIG. 2 illustrates operational processes, designated as 200, of printlegibility program 120. In process 202, print legibility program 120receives a file for printing. In some scenarios, print legibilityprogram 120 is a stand-alone application that a user provides indicationof the file's location in file data 130. In other scenarios, printlegibility program 120 is an add-on to another program that is providedthe file when the user chooses to print the file in the program. In somescenarios, print legibility program 120 receives a target device withthe request to print a file. In other scenarios, print legibilityprogram 120 selects a default target device.

In process 204, print legibility program 120 sets the current printscale for the file to an initial scale. In some scenarios, target data140 includes a default or initial scale value for a target device. Inother scenarios, print legibility program 120 receives an initial scalefrom the user when the print request is received. In process 206, printlegibility program 120 generates a print-preview of the file at thecurrent print scale. The print-preview module 122 generates an imagefile to be sent to a target device for printing.

In process 208, print legibility program 120 generates a text file ofthe print-preview image printed at the current scale. OCR module 124converts the image of text in (process 206) to a computer readable textformat, generating the preview text. In process 210, print legibilityprogram 120 determines an edit distance between the preview text and thefile text based on the number of edits or changes needed to be made inorder to make the preview text match the file text. In process 212,print legibility program 120 determines the recalled n-grams between thepreview text and the file text. A recalled n-gram is a sequence of “n”length words that appears in both the preview text and the file text.

In process 214, print legibility program 120 determines a legibilitymetric for the print preview at the current scale. Based on theedit-distance and recalled n-grams between the preview text and filetext, print legibility program 120 determines a legibility metric toindicates the legibility of the file to be printed at the current scale.If the legibility metric is above a threshold value (YES Branch ofprocess 216), then print legibility program 120 sends the file to thetarget device for printing at the current scale (process 220).

If the legibility metric is below a threshold value (NO Branch ofprocess 216), then print legibility program 120 increase the currentprint scale for the file (process 218). Print legibility program 120generates a new print preview (process 206) at the increased scale anddetermines a legibility metric at the increased scale (process 208-216).After each iteration, print legibility program 120 determines if thelegibility metric at the increased scale is above a threshold value(process 216), increasing the print scale (process 218) until thelegibility score is above the threshold value.

FIG. 3 illustrates a flow diagram 300 of print legibility program 120.In various embodiments, print legibility program 120 is provided filedata 130. Print legibility program 120 extracts the text from theoriginal file as file text 310. Print legibility program 120 prints thefile at current scale 322. Print legibility program 120 performs opticalcharacter recognition (OCR) on the print preview at current scale 322 togenerate preview text 324. Print legibility program 120 compares bothfile text 310 and preview text 324 to determine a legibility metric 330for the print preview at current scale 322. Legibility metric 330 isbased on, either collectively or separately, on edit distance 332 andrecalled n-grams 334 determined based on the comparison of file text 310and preview text 324. Legibility metric 330 affects current scale 322.If print legibility program 120 determines legibility metric 330 isbelow a threshold value, then print legibility program 120 increasescurrent scale 322.

FIG. 4 depicts a block diagram, 400, of components of computing device110, in accordance with an illustrative embodiment of the presentinvention. It should be appreciated that FIG. 4 provides only anillustration of one implementation and does not imply any limitationswith regard to the environments in which different embodiments may beimplemented. Many modifications to the depicted environment may be made.

Computing device 110 includes communications fabric 402, which providescommunications between computer processor(s) 404, memory 406, persistentstorage 408, communications unit 410, and input/output (I/O)interface(s) 412. Communications fabric 402 can be implemented with anyarchitecture designed for passing data and/or control informationbetween processors (such as microprocessors, communications and networkprocessors, etc.), system memory, peripheral devices, and any otherhardware components within a system. For example, communications fabric402 can be implemented with one or more buses.

Memory 406 and persistent storage 408 are computer-readable storagemedia. In this embodiment, memory 406 includes random access memory(RAM) 414 and cache memory 416. In general, memory 406 can include anysuitable volatile or non-volatile computer-readable storage media.

Print legibility program 120, file data 130 and target data 140 arestored in persistent storage 408 for execution and/or access by one ormore of the respective computer processors 404 via one or more memoriesof memory 406. In this embodiment, persistent storage 408 includes amagnetic hard disk drive. Alternatively, or in addition to a magnetichard disk drive, persistent storage 408 can include a solid state harddrive, a semiconductor storage device, read-only memory (ROM), erasableprogrammable read-only memory (EPROM), flash memory, or any othercomputer-readable storage media that is capable of storing programinstructions or digital information.

The media used by persistent storage 408 may also be removable. Forexample, a removable hard drive may be used for persistent storage 408.Other examples include optical and magnetic disks, thumb drives, andsmart cards that are inserted into a drive for transfer onto anothercomputer-readable storage medium that is also part of persistent storage408.

Communications unit 410, in these examples, provides for communicationswith other data processing systems or devices, including resources ofnetwork 150. In these examples, communications unit 410 includes one ormore network interface cards.

Communications unit 410 may provide communications through the use ofeither or both physical and wireless communications links. Printlegibility program 120, file data 130 and target data 140 may bedownloaded to persistent storage 408 through communications unit 410.

I/O interface(s) 412 allows for input and output of data with otherdevices that may be connected to computing device 110. For example, I/Ointerface 412 may provide a connection to external devices 418 such as akeyboard, keypad, a touch screen, and/or some other suitable inputdevice. External devices 418 can also include portable computer-readablestorage media such as, for example, thumb drives, portable optical ormagnetic disks, and memory cards. Software and data used to practiceembodiments of the present invention, e.g., print legibility program120, file data 130 and target data 140, can be stored on such portablecomputer-readable storage media and can be loaded onto persistentstorage 408 via I/O interface(s) 412. I/O interface(s) 412 also connectto a display 420.

Display 420 provides a mechanism to display data to a user and may be,for example, a computer monitor, or a television screen.

The programs described herein are identified based upon the applicationfor which they are implemented in a specific embodiment of theinvention. However, it should be appreciated that any particular programnomenclature herein is used merely for convenience, and thus theinvention should not be limited to use solely in any specificapplication identified and/or implied by such nomenclature.

It is to be noted that the term(s) “Smalltalk” and the like may besubject to trademark rights in various jurisdictions throughout theworld and are used here only in reference to the products or servicesproperly denominated by the marks to the extent that such trademarkrights may exist.

What is claimed is:
 1. A computer program product comprising: one ormore computer-readable storage media and program instructions stored onthe one or more computer-readable storage media, the programinstructions comprising: program instructions to receive a file to printto a target printing device; program instructions to generate a printpreview of the file based, at least in part, on one or moreconfigurations of the target printing device, wherein the print previewis generated at an initial scale; program instructions to generate apreview text for the print preview; program instructions to determine aplurality of legibility metrics based on a comparison between thepreview text for the print preview and text of the file to print,wherein the plurality of legibility metrics correspond to a plurality ofzones of the print preview; and in response to a legibility metric ofthe plurality of legibility metrics for a zone of the zones of the printpreview being below a predetermined value, program instructions to printthe zone of the file at a second scale, wherein the second scale islarger than the initial scale.
 2. The computer program product of claim1, wherein the legibility metric is based, at least in part, on an editdistance between the preview text and the file text.
 3. The computerprogram product of claim 1, wherein the legibility metric is based, atleast in part, on recalled n-grams between the preview text and the filetext.
 4. The computer program product of claim 1, wherein the printpreview is based, at least in part, on one or more of the followingtarget printing device configurations: (i) print size; (ii) print area;and (iii) print resolution.
 5. The computer program product of claim 1,wherein the program instructions further comprise: program instructionsto generate a second print preview of the file, wherein the printpreview is generated at the second scale; program instructions togenerate a second preview text for the second print preview; programinstructions to determine a second legibility metric based for thesecond print preview on a comparison between the second preview text andthe text of the file to print; and in response to the second legibilitymetric being below a predetermined value, program instructions to printthe file at a third scale, wherein the third scale is larger than thesecond scale.
 6. A computer system comprising: one or more computerprocessors; one or more computer readable storage media; and programinstructions stored on the computer readable storage media for executionby at least one of the one or more processors, the program instructionscomprising: program instructions to receive a file to print to a targetprinting device; program instructions to generate a print preview of thefile based, at least in part, on one or more configurations of thetarget printing device, wherein the print preview is generated at aninitial scale; program instructions to generate a preview text for theprint preview; program instructions to determine a plurality oflegibility metrics based on a comparison between the preview text forthe print preview and text of the file to print, wherein the pluralityof legibility metrics correspond to a plurality of zones of the printpreview; and in response to a legibility metric of the plurality oflegibility metrics for a zone of the zones of the print preview beingbelow a predetermined value, program instructions to print the zone ofthe file at a second scale, wherein the second scale is larger than theinitial scale.
 7. The computer system of claim 6, wherein the legibilitymetric is based, at least in part, on an edit distance between thepreview text and the file text.
 8. The computer system of claim 6,wherein the legibility metric is based, at least in part, on recalledn-grams between the preview text and the file text.
 9. The computersystem of claim 6, wherein the print preview is based, at least in part,on one or more of the following target printing device configurations:(i) print size; (ii) print area; and (iii) print resolution.
 10. Thecomputer system of claim 6, wherein the program instructions furthercomprise: program instructions to generate a second print preview of thefile, wherein the print preview is generated at the second scale;program instructions to generate a second preview text for the secondprint preview; program instructions to determine a second legibilitymetric based for the second print preview on a comparison between thesecond preview text and the text of the file to print; and in responseto the second legibility metric being below a predetermined value,program instructions to print the file at a third scale, wherein thethird scale is larger than the second scale.